<?php
/**
*	系统里默认的systoken模块的
*/
namespace Rainrock\Framework\Module;


use Rainrock\Framework\kernel\core\ModuleInfo;
use Rainrock\Framework\kernel\core\ModuleFields;

class SystokenModuleInfo extends ModuleInfo{
	
	protected function initModule(){
		 $this->setIsinput(false);
		 $this->setName('登录TOKEN');
		 $this->setNum('systoken');
		 
		 $this->addIndex('jian','token');
		 $this->addIndex('key','uid');
		 
		 $this->addFields(ModuleFields::get('uid')
			->setName('用户ID')
			->setDev(0)
			->setLen(11)
			->setType('int')
		 );
		 
		 $this->addFields(ModuleFields::get('token')
			->setName('登录Token')
			->setLen(50)
			->setType('varchar')
		 );
		 
		 $this->addFields(ModuleFields::get('web')
			->setName('浏览器')
			->setLen(50)
			->setType('varchar')
		 );
		 
		 $this->addFields(ModuleFields::get('cfrom')
			->setName('来源')
			->setLen(50)
			->setType('varchar')
		 );
		 
		 $this->addFields(ModuleFields::get('adddt')
			->setName('添加时间')
			->setType('datetime')
		 );
		 
		 $this->addFields(ModuleFields::get('moddt')
			->setName('更新时间')
			->setType('datetime')
		 );
		 
		 $this->addFields(ModuleFields::get('ip')
			->setName('登录IP')
			->setLen(50)
			->setType('varchar')
		 );
		 
		 $this->addFields(ModuleFields::get('device')
			->setName('登录设备')
			->setLen(50)
			->setType('varchar')
		 );
		 
		 $this->addFields(ModuleFields::get('explain')
			->setName('说明')
			->setLen(200)
			->setType('varchar')
		 );
		 
		 $this->addFields(ModuleFields::get('regid')
			->setName('APP的注册')
			->setLen(50)
			->setType('varchar')
		 );
		 
		 $this->addFields(ModuleFields::get('online')
			->setName('在线')
			->setLen(1)
			->setDev(1)
			->setIspx(1)
			->setFieldstype('checkbox')
			->setType('tinyint')
		 );
	}
	
}